﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using DBO.Economy;
using DBO;
using BusinessManagement;

namespace SOAPDataService
{
    public class SOAPDataService : ISOAPDataService
    {
        public Resources GetResource(string name)
        {
            return ServerDataSingleton.Instance.ResourceRepository.Get<Resources>(name);
        }

        public UnitStatistics GetStatistics(string name)
        {
            return ServerDataSingleton.Instance.ResourceRepository.Get<UnitStatistics>(name);
        }

        public IList<Race> GetRaces()
        {
            RaceDictionary Dict = (RaceDictionary)ServerDataSingleton.Instance.ResourceRepository.GetDictionnary<Race>();

            return Dict.GetAll();
        }

    }
}
